package cn.jzq.kotoba.modules.sharding.service.impl;

import cn.jzq.kotoba.modules.sharding.mapper.PersonMapper;
import cn.jzq.kotoba.modules.sharding.model.entity.Person;
import cn.jzq.kotoba.modules.sharding.service.PersonService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author jzq
 * @date 2019/2/19 17:17
 */
@Service
public class PersonServiceImpl extends ServiceImpl<PersonMapper, Person> implements PersonService {
    private final PersonMapper personMapper;

    @Autowired
    public PersonServiceImpl(PersonMapper personMapper) {
        this.personMapper = personMapper;
    }

    @Override
    public Person getPerson(Integer id) {
        Person person =  personMapper.getPerson(id);
        return person;
    }
}
